#include<bits/stdc++.h>
using namespace std;
class Fraction
{
    private:
        int numerator,denominator;
    public:
        int common_divisor(){}
        void contracted(){}
        Fraction(int a=0,int b=1)
        {
            numerator=a;
            denominator=b;
        }
        Fraction(const Fraction& tmp)
        {
            numerator=tmp.numerator;
            denominator=tmp.denominator;
        }
        void Set(int a=0,int b=1)
        {
            numerator=a;
            denominator=b;
        }
        void disp()
        {
            cout<<"fraction="<<numerator<<"/"<<denominator<<endl;
        }
        Fraction operator+(Fraction& a)
        {
            Fraction ans;
            ans.denominator=denominator*a.denominator;
            ans.numerator=numerator*a.denominator+a.numerator*denominator;
            return ans;
        }
        Fraction operator-(Fraction& a)
        {
            Fraction ans;
            ans.denominator=denominator*a.denominator;
            ans.numerator=numerator*a.denominator-a.numerator*denominator;
            return ans;
        }
        Fraction operator*(Fraction& a)
        {
            Fraction ans;
            ans.denominator=denominator*a.denominator;
            ans.numerator=numerator*a.numerator;
            return ans;
        }
        Fraction operator/(Fraction& a)
        {
            Fraction ans;
            ans.denominator=denominator*a.numerator;
            ans.numerator=numerator*a.denominator;
            return ans;
        }
};
int main()
{
    int a,b,c,d;
    cin>>a>>b>>c>>d;
    Fraction a1(a,b),a2(c,d);
    (a1+a2).disp();
    (a1-a2).disp();
    (a1*a2).disp();
    (a1/a2).disp();
}